/*
 Navicat Premium Data Transfer

 Source Server         : 39.108.142.248
 Source Server Type    : MySQL
 Source Server Version : 100309
 Source Host           : 39.108.142.248:3306
 Source Schema         : zhifayi

 Target Server Type    : MySQL
 Target Server Version : 100309
 File Encoding         : 65001

 Date: 07/01/2019 17:24:33
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for device_gps
-- ----------------------------
DROP TABLE IF EXISTS `device_gps`;
CREATE TABLE `device_gps` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `device_id` varchar(32) DEFAULT NULL COMMENT '设备编号',
  `device_name` varchar(50) DEFAULT NULL COMMENT '设备名称',
  `device_type` varchar(5) DEFAULT NULL COMMENT '设备类型',
  `battery_remaining` varchar(50) DEFAULT NULL COMMENT '剩余电量',
  `time` varchar(20) DEFAULT NULL COMMENT '采样时间',
  `division_ew` varchar(5) DEFAULT NULL COMMENT 'E:东半球;W:西半球',
  `longitude` double DEFAULT NULL COMMENT '经度',
  `division_ns` varchar(5) DEFAULT NULL COMMENT 'N:北半球;S:南半球',
  `latitude` double DEFAULT NULL COMMENT '纬度',
  `direction` double DEFAULT NULL COMMENT '车辆方向',
  `speed` double DEFAULT NULL COMMENT '速度 米/小时',
  `satellites` int(8) DEFAULT NULL COMMENT '卫星数量',
  `precision` double DEFAULT NULL COMMENT '精度因子',
  `height` double DEFAULT NULL COMMENT '高度',
  `retrans_flag` int(2) DEFAULT NULL COMMENT '重传标记',
  `nees_response` int(2) DEFAULT NULL COMMENT '回应标记',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  `pitch_angle` varchar(255) DEFAULT NULL,
  `relative_height` varchar(20) DEFAULT NULL,
  `roll_angle` varchar(20) DEFAULT NULL,
  `vertical_speed` varchar(20) DEFAULT NULL,
  `yaw_angle` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for dic_group
-- ----------------------------
DROP TABLE IF EXISTS `dic_group`;
CREATE TABLE `dic_group` (
  `group_id` int(11) NOT NULL AUTO_INCREMENT,
  `group_name_eng` varchar(255) DEFAULT NULL,
  `group_name_ch` varchar(255) DEFAULT NULL,
  `display_order` int(11) DEFAULT NULL,
  PRIMARY KEY (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of dic_group
-- ----------------------------
BEGIN;
INSERT INTO `dic_group` VALUES (1, 'mainNav', '平台', 1);
INSERT INTO `dic_group` VALUES (2, 'settingNav', '设置', 2);
COMMIT;

-- ----------------------------
-- Table structure for dic_system
-- ----------------------------
DROP TABLE IF EXISTS `dic_system`;
CREATE TABLE `dic_system` (
  `sys_id` int(11) NOT NULL AUTO_INCREMENT,
  `sys_name` varchar(255) DEFAULT NULL,
  `display_oder` int(11) DEFAULT NULL,
  PRIMARY KEY (`sys_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for hk_device
-- ----------------------------
DROP TABLE IF EXISTS `hk_device`;
CREATE TABLE `hk_device` (
  `camera_id` varchar(32) DEFAULT NULL COMMENT '通道id',
  `name` varchar(50) DEFAULT NULL COMMENT '监控点名称',
  `extra_field` varchar(255) DEFAULT NULL COMMENT '扩展',
  `latitude` varchar(30) DEFAULT NULL COMMENT '经度',
  `control_unit_name` varchar(50) DEFAULT NULL COMMENT '控制中心名称',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `is_online` varchar(2) DEFAULT NULL COMMENT '是否在线(1在线,0不在线)\n   ',
  `update_time` bigint(20) DEFAULT NULL,
  `camera_type` varchar(10) DEFAULT NULL COMMENT '摄像机类型(0枪机,1半球,2快球3带云台枪机)',
  `create_time` bigint(20) DEFAULT NULL,
  `decode_tag` varchar(20) DEFAULT NULL COMMENT '解码标签',
  `index_code` varchar(32) NOT NULL COMMENT '索引编号',
  `pixel` varchar(20) DEFAULT NULL COMMENT '摄像头像素',
  `parent_index_code` varchar(32) DEFAULT NULL COMMENT '控制中心id',
  `longitude` varchar(30) DEFAULT NULL COMMENT '纬度wgs84',
  PRIMARY KEY (`index_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for hk_unit
-- ----------------------------
DROP TABLE IF EXISTS `hk_unit`;
CREATE TABLE `hk_unit` (
  `unit_type` int(2) DEFAULT NULL COMMENT '1组织  2区域',
  `parent_tree` varchar(32) DEFAULT NULL COMMENT '菜单项的树结构',
  `create_time` bigint(20) DEFAULT NULL,
  `unit_level` int(2) DEFAULT NULL COMMENT '层级',
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `index_code` varchar(50) NOT NULL COMMENT '组织编号',
  `update_time` bigint(20) DEFAULT NULL,
  `parent_index_code` varchar(50) DEFAULT NULL COMMENT '父组织编号',
  PRIMARY KEY (`index_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for human
-- ----------------------------
DROP TABLE IF EXISTS `human`;
CREATE TABLE `human` (
  `human_id` int(11) NOT NULL AUTO_INCREMENT,
  `human_name` varchar(255) DEFAULT NULL,
  `human_code` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `phone_number` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `unit_id` int(11) DEFAULT NULL,
  `region_id` int(11) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `is_law_person` int(11) DEFAULT 0,
  `duty_id` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`human_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of human
-- ----------------------------
BEGIN;
INSERT INTO `human` VALUES (1, 'admin', '0001', NULL, '1234', '测试地址', 1, 1, 'test@qq.com', 1, 2);
INSERT INTO `human` VALUES (2, '夏建华', '0002', NULL, NULL, NULL, 18, 1, NULL, 1, 1);
INSERT INTO `human` VALUES (3, '厉娜', '0003', NULL, NULL, NULL, 18, 1, NULL, 1, 1);
INSERT INTO `human` VALUES (4, '陈大伟', '0004', NULL, NULL, NULL, 18, 1, NULL, 1, 1);
INSERT INTO `human` VALUES (5, '林红', '0005', NULL, NULL, NULL, 18, 1, NULL, 1, 1);
INSERT INTO `human` VALUES (6, '徐禹', '0006', NULL, NULL, NULL, 18, 1, NULL, 1, 1);
INSERT INTO `human` VALUES (7, '朱廷伟', '0007', NULL, NULL, NULL, 18, 1, NULL, 1, 1);
INSERT INTO `human` VALUES (8, '丁向红', '0008', NULL, NULL, NULL, 18, 1, NULL, 1, 1);
INSERT INTO `human` VALUES (9, '郭福灵', '0009', NULL, NULL, NULL, 18, 1, NULL, 1, 1);
INSERT INTO `human` VALUES (10, '吴伟', '0010', NULL, NULL, NULL, 25, 1, NULL, 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for human_nav_item
-- ----------------------------
DROP TABLE IF EXISTS `human_nav_item`;
CREATE TABLE `human_nav_item` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `human_id` int(11) DEFAULT NULL,
  `nav_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `navID` (`nav_id`),
  KEY `humanID` (`human_id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of human_nav_item
-- ----------------------------
BEGIN;
INSERT INTO `human_nav_item` VALUES (1, 7, 5);
INSERT INTO `human_nav_item` VALUES (2, 7, 6);
INSERT INTO `human_nav_item` VALUES (3, 7, 1);
INSERT INTO `human_nav_item` VALUES (4, 2, 5);
INSERT INTO `human_nav_item` VALUES (5, 2, 6);
INSERT INTO `human_nav_item` VALUES (6, 2, 1);
INSERT INTO `human_nav_item` VALUES (7, 3, 7);
INSERT INTO `human_nav_item` VALUES (8, 1, 5);
INSERT INTO `human_nav_item` VALUES (9, 1, 1);
INSERT INTO `human_nav_item` VALUES (10, 1, 3);
INSERT INTO `human_nav_item` VALUES (11, 1, 2);
INSERT INTO `human_nav_item` VALUES (12, 5, 5);
INSERT INTO `human_nav_item` VALUES (13, 5, 6);
INSERT INTO `human_nav_item` VALUES (14, 5, 1);
INSERT INTO `human_nav_item` VALUES (15, 5, 7);
INSERT INTO `human_nav_item` VALUES (16, 5, 8);
INSERT INTO `human_nav_item` VALUES (17, 5, 3);
INSERT INTO `human_nav_item` VALUES (18, 5, 2);
INSERT INTO `human_nav_item` VALUES (19, 9, 5);
INSERT INTO `human_nav_item` VALUES (20, 9, 6);
INSERT INTO `human_nav_item` VALUES (21, 9, 1);
INSERT INTO `human_nav_item` VALUES (22, 9, 7);
INSERT INTO `human_nav_item` VALUES (23, 9, 8);
INSERT INTO `human_nav_item` VALUES (24, 9, 3);
INSERT INTO `human_nav_item` VALUES (25, 9, 2);
INSERT INTO `human_nav_item` VALUES (26, 12, 5);
INSERT INTO `human_nav_item` VALUES (27, 12, 6);
INSERT INTO `human_nav_item` VALUES (28, 12, 1);
INSERT INTO `human_nav_item` VALUES (29, 12, 7);
INSERT INTO `human_nav_item` VALUES (30, 12, 8);
INSERT INTO `human_nav_item` VALUES (31, 12, 3);
INSERT INTO `human_nav_item` VALUES (32, 12, 2);
COMMIT;

-- ----------------------------
-- Table structure for nav_item
-- ----------------------------
DROP TABLE IF EXISTS `nav_item`;
CREATE TABLE `nav_item` (
  `nav_id` int(11) NOT NULL,
  `nav_name_eng` varchar(255) DEFAULT NULL,
  `nav_name_ch` varchar(255) DEFAULT NULL,
  `nav_icon` varchar(255) DEFAULT NULL,
  `group_id` int(11) DEFAULT NULL,
  `senior_id` int(11) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `display_order` int(11) DEFAULT NULL,
  `available` int(11) DEFAULT 1 COMMENT '0 表示不可用',
  `is_leaf` int(11) NOT NULL DEFAULT 0 COMMENT '方便开发时判断是否为叶子节点',
  PRIMARY KEY (`nav_id`),
  KEY `groupID` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of nav_item
-- ----------------------------
BEGIN;
INSERT INTO `nav_item` VALUES (1, 'MonitorFlat', '监管平台', 'icon-desktop', 1, -1, NULL, 1, 1, 0);
INSERT INTO `nav_item` VALUES (2, 'SysSetting', '系统设置', 'icon-cog', 2, -1, '', 2, 1, 0);
INSERT INTO `nav_item` VALUES (3, 'HumanSetting', '人员设置', 'icon-cogs', 2, 2, 'view/builder/human/human', 3, 1, 1);
INSERT INTO `nav_item` VALUES (5, 'DuplicateRecFlat', '执法队员', 'icon-eye-open', 1, 1, 'view/business/repeatrec', 5, 1, 1);
INSERT INTO `nav_item` VALUES (6, 'OverTimeRecFlat', '超时案件监管', 'icon-bell', 1, 1, 'view/business/overtimerec', 6, 1, 1);
INSERT INTO `nav_item` VALUES (7, 'registerRec', '登记平台', 'icon-edit', 1, -1, 'view/business/register', 7, 1, 1);
INSERT INTO `nav_item` VALUES (8, 'registerRecQuery', '登记查询', ' icon-search', 1, -1, 'view/business/registerquery', 8, 1, 1);
INSERT INTO `nav_item` VALUES (9, 'overstockRec', '积压案件监管', 'icon-bell', 1, 1, 'view/business/overstock', 9, 1, 1);
COMMIT;

-- ----------------------------
-- Table structure for report
-- ----------------------------
DROP TABLE IF EXISTS `report`;
CREATE TABLE `report` (
  `report_id` int(11) NOT NULL AUTO_INCREMENT,
  `device_id` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  `event_desc` varchar(300) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`report_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of report
-- ----------------------------
BEGIN;
INSERT INTO `report` VALUES (7, '2163481274', '2018-04-16 15:02:42', '设备无法正常开机');
INSERT INTO `report` VALUES (8, '21412432', '2018-04-16 15:03:26', '设备电池供电问题');
COMMIT;

-- ----------------------------
-- Table structure for sys
-- ----------------------------
DROP TABLE IF EXISTS `sys`;
CREATE TABLE `sys` (
  `sys_id` int(11) NOT NULL AUTO_INCREMENT,
  `sys_name` varchar(255) DEFAULT NULL,
  `display_oder` int(11) DEFAULT NULL,
  PRIMARY KEY (`sys_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
  `sys_id` int(11) NOT NULL,
  `sys_name` varchar(255) DEFAULT NULL,
  `human_id` int(11) DEFAULT NULL,
  `human_name` varchar(255) DEFAULT NULL,
  `valid` int(11) DEFAULT NULL,
  PRIMARY KEY (`sys_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for unit
-- ----------------------------
DROP TABLE IF EXISTS `unit`;
CREATE TABLE `unit` (
  `unit_id` int(11) NOT NULL AUTO_INCREMENT,
  `unit_name` varchar(255) DEFAULT NULL,
  `senior_id` int(11) DEFAULT NULL,
  `class_id` int(11) DEFAULT NULL,
  `class_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`unit_id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of unit
-- ----------------------------
BEGIN;
INSERT INTO `unit` VALUES (1, '宁波市执法局', -1, 1, '一级');
INSERT INTO `unit` VALUES (2, '直属大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (3, '海曙大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (4, '江北大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (5, '鄞州大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (6, '镇海大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (7, '北仑大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (8, '高新大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (9, '东钱湖大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (10, '慈溪大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (11, '余姚大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (12, '奉化大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (13, '象山大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (14, '宁海大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (15, '保税大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (16, '大榭大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (17, '杭州湾大队', 1, 2, '二级');
INSERT INTO `unit` VALUES (18, '海曙大队部', 3, 3, '三级');
INSERT INTO `unit` VALUES (19, '白云中队', 3, 3, '三级');
INSERT INTO `unit` VALUES (20, '段塘中队', 3, 3, '三级');
INSERT INTO `unit` VALUES (21, '鼓楼中队', 3, 3, '三级');
INSERT INTO `unit` VALUES (22, '江夏中队', 3, 3, '三级');
INSERT INTO `unit` VALUES (23, '南门中队', 3, 3, '三级');
INSERT INTO `unit` VALUES (24, '南站中队', 3, 3, '三级');
INSERT INTO `unit` VALUES (25, '直属中队', 2, 3, '三级');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
